<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<title></title>
</head>
<body>
	
</body>
</html>
<script type="text/javascript">
var a = ['cat','Dog','Bug','ant'];
alert(a.sort(function(x,y){
	var a = x.toLowerCase();
	var b = y.toLowerCase();
	if(a < b) return -1;
	if(a > b) return 1;
	return 0;
}));
</script>